#import <Cocoa/Cocoa.h>


@class BWSymbol;

@interface BWStitchEditCanvas : NSView
{
    IBOutlet id delegate;

    BWSymbol *rawPath;

    NSPoint overridePoint;
    int trackingIndex; // -1 for no tracking index

    int selectedIndex;
    BOOL curveToggleState;
    BOOL controlPointToggleState;

    BOOL draggingPath;
    NSPoint originalClick;
    float offsetX, offsetY;
}

- (void) setRawPath: (BWSymbol *) rawPath;

- (int) selectedIndex;

- (BOOL) curveToggleState;
- (void) setCurveToggleState: (BOOL) onOff;

- (BOOL) controlPointToggleState;
- (void) setControlPointToggleState: (BOOL) onOff;

@end // BWStitchEditCanvas


@interface NSObject(BWStitchEditCanvasPointChangeDelegate)

- (void) pointIndex: (int) index  changedToPoint: (NSPoint) point;
- (void) selectedPoint: (int) index;
- (void) movePathByX: (float) offsetX  Y: (float) offsetY;


@end // BWStitchEditCanvasPointChangeDelegate

